package asia.doing.controller.admin;

import asia.doing.common.Result;
import asia.doing.entity.Likes;
import asia.doing.service.admin.ManageLikesService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController(value = "manageLikeController")
@RequestMapping("/manage/likes")
public class ManageLikeController {
    @Resource
    private ManageLikesService manageLikesService;

    //点赞与取消
    @PostMapping("/set")
    public Result set(@RequestBody Likes likes){
        manageLikesService.set(likes);
        return Result.success();
    }
}
